﻿Imports Sy.Data

Public Class ReportSendEmail
    Inherits JsonObject(Of ReportSendEmail)
    Public Sub New() : End Sub

    Public Sub New(receiverEmail As String, senderEmail As String, state As SendState, marketingTaskId As Integer, marketingTaskName As String, complete As Boolean, first As Boolean, errorMsg As String, templateId As String, templateName As String)
        Me.ReceiverEmail = receiverEmail
        Me.SenderEmail = senderEmail
        Me.State = state
        Source = marketingTaskId
        Me.MarketingTaskName = marketingTaskName
        Me.Complete = complete
        Me.First = first
        Me.ErrorMsg = errorMsg
        Me.TemplateId = templateId
        Me.TemplateName = templateName
    End Sub

    Public Property ReceiverEmail As String
    Public Property SendingType As Integer = 1
    Public Property SenderEmail As String
    Public Property State As SendState
    Public Property Source As Integer
    Public Property MarketingTaskName As String
    Public Property TemplateId As String
    Public Property TemplateName As String
    ''' <summary>
    ''' 是否发送结束
    ''' </summary>
    ''' <returns></returns>
    Public Property Complete As Boolean
    ''' <summary>
    ''' 本次发送的第一封邮件
    ''' </summary>
    ''' <returns></returns>
    Public Property First As Boolean
    Public Property ErrorMsg As String
End Class
Public Enum SendState
    Success = 1
    Fail = 2
    Reply = 3
    ReBack = 4
End Enum
